fid=fopen('myfile.txt','r');
while ~feof(fid)%test end of file
    %line=fgets(fid);
    line=fgetl(fid);
    fprintf(1,'%s',line);
end
fclose(fid);
